﻿using System;

namespace EmbeddedSharp.Core.Function.Maths {

    /// <summary>
    /// 
    /// </summary>
    public class ExpNode : FuncNode {
        
        public ExpNode() {
            base.Value = "exp";
        }

        public override object Evaluate()
        {
            if (Parameters.Count < 1)
            {
                throw new ArgumentException("");
            }

            double result = Convert.ToDouble(Parameters[0].Evaluate());

            return System.Math.Exp(result).ToString();
        }
    }
}
